package sim_enum

// 公共-运营商
type commonAgent int

var CommonAgent commonAgent

// 移动
func (c *commonAgent) 移动() int {
	return 1
}

// 联通
func (c *commonAgent) 联通() int {
	return 2
}

// 电信
func (c *commonAgent) 电信() int {
	return 3
}

func (c *commonAgent) ToText(value int) string {
	switch value {

	case 1:
		return "移动"

	case 2:
		return "联通"

	case 3:
		return "电信"

	}
	return ""
}

func (c *commonAgent) ToValue(text string) int {
	switch text {

	case "移动":
		return 1

	case "联通":
		return 2

	case "电信":
		return 3

	}
	return 0
}
